package com.zhejiangzhengyuan.municipal_common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhejiangzhengyuan.municipal_common.entity.Case;
import com.zhejiangzhengyuan.municipal_common.entity.dto.ReceiptCaseDto;
import com.zhejiangzhengyuan.municipal_common.entity.dto.SendCase;
import com.zhejiangzhengyuan.municipal_common.entity.vo.AcceptTestDdetails;
import com.zhejiangzhengyuan.municipal_common.entity.vo.CaseNoHandle;
import com.zhejiangzhengyuan.municipal_common.response.ResponseVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * 案件表，案件是对事件来源数据以及相应处理过程和结果的包裹数据 服务类
 *
 * @author linju
 * @since 2019-11-22
 */
public interface CaseService extends IService<Case> {

  ResponseVo saveCase(SendCase sendCase, String caseType, String moduleName) throws IOException;

  long newCase(Case c, String caseType);

  // 井盖案件回执
  long receiptCase(ReceiptCaseDto receiptCaseDto, String moduleName);

  // 井盖案件回执打回，需要重新提交回执
  int repeatReceipt(Long cid);

  // 发送任务短信到指定部门
  void insertMessageToDepartment(
      String moduleName, String taskType, String action, String departmentName);

  // 发送任务短信到指定部门
  void insertTomorrowMessageToDepartment(
      String moduleName, String taskType, String action, String startTime,String departmentName);
  // 井盖案件从处理中转向已处理
  int caseHandingTurnToCaseIsHandled(Long cid);

  // 巡檢案件从处理中转向已处理
  int caseInspectionHandingTurnToCaseIsHandled(Long cid);

  int changeStatus(Long cid);

  AcceptTestDdetails mobileAcceptTestDdetails(Long cid);

  int uploadToFile(long cid, MultipartFile file, String moduleName) throws IOException;

  int uploadReceiptToFile(long rid, MultipartFile file, String moduleName) throws IOException;

  int uploadInspectionToFile(long iid, MultipartFile file, String moduleName) throws IOException;

  CaseNoHandle mobileOtherTestDdetails(Long cid);
}
